#ifndef __BMP280_REGISTER_H
#define __BMP280_REGISTER_H


#define BMPADDRES       0xEC
#define temp_xlsb       0xFC
#define temp_lsb        0xFB
#define temp_msb        0xFA
#define press_xlsb      0xF9
#define press_lsb       0xF8
#define press_msb       0xF7
#define config          0xF5
#define ctrl_means      0xF4
#define status          0xF3
#define rest            0xE0
#define id              0xD0


/*calibration parameters */
#define BMP280_DIG_T1_LSB_REG                0x88
#define BMP280_DIG_T1_MSB_REG                0x89
#define BMP280_DIG_T2_LSB_REG                0x8A
#define BMP280_DIG_T2_MSB_REG                0x8B
#define BMP280_DIG_T3_LSB_REG                0x8C
#define BMP280_DIG_T3_MSB_REG                0x8D
#define BMP280_DIG_P1_LSB_REG                0x8E
#define BMP280_DIG_P1_MSB_REG                0x8F
#define BMP280_DIG_P2_LSB_REG                0x90
#define BMP280_DIG_P2_MSB_REG                0x91
#define BMP280_DIG_P3_LSB_REG                0x92
#define BMP280_DIG_P3_MSB_REG                0x93
#define BMP280_DIG_P4_LSB_REG                0x94
#define BMP280_DIG_P4_MSB_REG                0x95
#define BMP280_DIG_P5_LSB_REG                0x96
#define BMP280_DIG_P5_MSB_REG                0x97
#define BMP280_DIG_P6_LSB_REG                0x98
#define BMP280_DIG_P6_MSB_REG                0x99
#define BMP280_DIG_P7_LSB_REG                0x9A
#define BMP280_DIG_P7_MSB_REG                0x9B
#define BMP280_DIG_P8_LSB_REG                0x9C
#define BMP280_DIG_P8_MSB_REG                0x9D
#define BMP280_DIG_P9_LSB_REG                0x9E
#define BMP280_DIG_P9_MSB_REG                0x9F



typedef struct {
	uint16_t T1; 		/*<calibration T1 data*/
	int16_t T2;  	 	/*<calibration T2 data*/
	int16_t T3;  		/*<calibration T3 data*/
	uint16_t P1;  	    /*<calibration P1 data*/
	int16_t P2;  		/*<calibration P2 data*/
	int16_t P3;  		/*<calibration P3 data*/
	int16_t P4;  		/*<calibration P4 data*/
	int16_t P5;  		/*<calibration P5 data*/
	int16_t P6;  		/*<calibration P6 data*/
	int16_t P7;  		/*<calibration P7 data*/
	int16_t P8;  		/*<calibration P8 data*/
	int16_t P9;			/*<calibration P9 data*/
	int32_t T_fine;	/*<calibration t_fine data*/
} BMP280_HandleTypeDef;


#endif
